#roomList {
    padding: 20px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    margin-bottom: 50px;
}

.room-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    min-height: 200px;
}

.room-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.room-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.room-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
}

/* 状态样式 */
.room-status:contains("等待中") {
    background-color: #e3f2fd;
    color: #1976d2;
}

.room-status:contains("游戏中") {
    background-color: #e8f5e9;
    color: #388e3c;
}

.room-status:contains("已结束") {
    background-color: #ffebee;
    color: #d32f2f;
}

.card-text {
    color: #666;
    margin: 10px 0;
    flex-grow: 1;
}

.room-footer {
    margin-top: auto;
    padding-top: 15px;
    position: relative;
    z-index: 3;
}

/* 创建房间按钮 */
#roomList .btn-primary {
    background-color: #1976d2;
    border: none;
    padding: 12px 24px;
    width: 100%;
    border-radius: 8px;
    font-size: 1.1em;
}

/* 加入房间按钮 */
.room-item .btn-success {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    position: relative;
    z-index: 4;
    margin-bottom: 5px;
}

.room-item .btn-success:hover {
    background-color: #28a745;
    border-color: #28a745;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.room-item .btn-success:disabled {
    background-color: #ccc;
    border-color: #ccc;
    pointer-events: none;
}

.room-item .btn-success:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* 修改容器样式 */
#gameRoom {
    padding-bottom: 100px;
    min-height: calc(100vh - 100px);
    overflow-y: auto;
}

/* 修改列布局样式 */
.col-md-6 {
    margin-bottom: 30px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .col-md-6 {
        padding: 0 10px;
        margin-bottom: 20px;
    }
    
    .room-item {
        margin-bottom: 20px;
        min-height: 180px;
    }
    
    #gameRoom {
        padding-bottom: 80px;
    }
    
    #roomList {
        margin-bottom: 30px;
    }
}

/* 确保页面容器有足够的空间 */
.container {
    min-height: 100vh;
    padding-bottom: 50px;
}